package com.fruits.login.dao;

import com.fruits.login.model.ConfigVersionInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author cyc
 */
@Mapper
public interface ConfigVersionDAO {

    /**
     * 根据sysId and version 获取对应的版本信息
     * 查到的信息应有且只有一个
     * @param version
     * @param sysId
     * @return
     */
    @Select("select version,sysId,downUrl,isaduite as aduite from config_version where version = #{version} and sysId = #{sysId}")
    ConfigVersionInfo getVersionInfo(@Param("version") String version, @Param("sysId") int sysId);
}
